home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Q-R / QuickTurtle.cpt / QuickTurtle / QTPrograms / quickTurtle.t / quickTurtle.t
Encoding:
Text File  |  1991-06-27  |  719 b   |  23 lines  |  [TEXT/>QT<]

  1. -- This program has an “endless” repeat loop — it keeps on running until
  2. -- you click the mouse in the drawing window (the method for stopping any
  3. -- drawing.)
  4.  
  5. -- the quickTurtle procedure is actually a bit too quick on faster machines;
  6. -- try slowing it down by entering a slight delay in the “Set Delay” dialog.
  7.  
  8. program quickTurtle
  9.  
  10. on quickTurtle
  11.     repeat
  12.         put abs(random(2)) + 1 into side
  13.         put abs(random(180)) + 90 into angle
  14.         put abs(random(3)) + 1 into increment
  15.         repeat while side < 260
  16.             forward side
  17.             turn right angle
  18.             put side + increment into side
  19.         end repeat
  20.         clear screen
  21.         set position 0,0
  22.     end repeat
  23. end quickTurtle